//发送注销登录请求
function logout() {
    if (confirm('确认注销吗？')) {
        jQuery.ajax({
            url: "user/logout",
            type: "get",
            success: function (result) {
                if (result != null && result.code == 200) {
                    location.href = '../login.html'
                } else {
                    alert('退出登陆失败，请重试！')
                }
            }
        })
    }
}


//获取url中的参数
function getURlParam(key) {
    var params = location.search.substring(1)
    if (params.length > 1) {
        var kvs = params.split("&")
        for (var i = 0; i < kvs.length; i++) {
            var keyRes = kvs[i].split("=");
            if (key == keyRes[0]) {
                return keyRes[1]
            }
        }
    }
    return null;
}